<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>

    <title>岗位列表</title>
    <jsp:include page="/static/common/easyui_header.jsp"></jsp:include>
    <script type="text/javascript" src="/static/js/views/role.js"></script>
    <script type="text/javascript" src="/static/js/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
</head>
<body>

<table id="role_datagrid" class="easyui-datagrid"
       data-options="rownumbers:true,singleSelect:true,url:'/role/list',fit:'true',border:'false',
        fitColumns:'true',method:'post',toolbar:'#role_datagrid_toolbar'">
    <thead>
    <tr>
        <th data-options="field:'ck',checkbox:true"></th>
        <th data-options="field:'name',align:'center',width:'100px'">岗位名称</th>
        <th data-options="field:'permission',align:'center',width:'100px',formatter:formatPermission">设置权限</th>
        <th data-options="field:'remake',align:'center',width:'200px'">备注</th>
    </tr>
    </thead>
</table>

<div id="role_dialog" class="easyui-dialog" title="新增"
     data-options="resizable:true,modal:true,closed:true,buttons:'#role_form_buttons'">
    <form id="role_add_form" class="easyui-form" method="post">
        <input name="id" type="hidden" id="role_id">
        <table>
            <tr>
                <td>岗位名称<input name="name" class="easyui-textbox"></td>
                <td>岗位备注<input name="remake" class="easyui-textbox"></td>
            </tr>
        </table>
    </form>
</div>
<!--底部按钮-->
<div id="role_form_buttons" style="float:right">
    <a href="javascript:;" class="easyui-linkbutton" data-cmd="save">保存</a>
    <a href="javascript:;" class="easyui-linkbutton" data-cmd="cancel">关闭</a>
</div>
<!--工具栏(左侧)-->
<div id="role_datagrid_toolbar">
    <a class="easyui-linkbutton" iconCls="icon-add" plain="true" data-cmd="addRole">添加岗位</a>
    <a class="easyui-linkbutton" iconCls="icon-edit" plain="true" data-cmd="editRole">修改</a>
    <a class="easyui-linkbutton" iconCls="icon-remove" plain="true" data-cmd="deleteRole">删除</a>
    <a class="easyui-linkbutton" iconCls="icon-reload" plain="true" data-cmd="reloadRole">刷新</a>
</div>

<%--添加的弹框--%>
<div id="dlg" style="padding: 10px">
    <form id="ro_add_form" method="post">
        <input name="id" type="text" id="ro_id">
        <table>
            <tr>
                <td colspan="2">
                    <input id="permisssions_combox" class="easyui-combobox"
                           data-options="valueField:'id',textField:'name',url:'/permission/listAll',multiple:true" />
                </td>
                <td></td>
            </tr>
        </table>
    </form>
</div>
    <div id="role_dialog_buttons">
        <a class="easyui-linkbutton" iconcls="icon-ok" plain="true" data-cmd="savePermission">确定</a>
        <a class="easyui-linkbutton" iconcls="icon-cancel" plain="true" data-cmd="cancel">取消</a>
    </div>

</body>
</html>
